package cn.iocoder.yudao.module.digital.service.cardchannel.model;

import lombok.Data;
import lombok.Getter;

import java.math.BigDecimal;
import java.util.List;

@Data
public class ProductResponse {
    private String entityId;
    private Summary summary;
    private Details details;

    @Data
    public static class Summary {
        private String entityId;
        private String productName;
        private String currency;
        private String universalProductCode;
        private String productLineId;
        private String startDate;
        private String locale;
    }

    @Data
    public static class Details {
        private String creatorId;
        private String updaterId;
        private String createdTimestamp;
        private String updatedTimestamp;
        private List<String> additionalAttributes;
        private String productDescription;
        private Boolean isTaxable;
        private List<String> searchKeywords;
        private ActivationCharacteristics activationCharacteristics;
        private ReloadCharacteristics reloadCharacteristics;
        private List<FulfillmentCharacteristics> fulfillmentCharacteristics;
        private List<ProductFees> productFees;
        private RedemptionCharacteristics redemptionCharacteristics;
        private List<TermsAndConditions> termsAndConditions;
        private List<ProductConfigurations> productConfigurations;
    }

    @Getter(value = lombok.AccessLevel.PUBLIC) // 使用 GETTER 访问级别
    public static class ActivationCharacteristics {
        private BigDecimal baseValueAmount;
        private BigDecimal maxValueAmount;
        private Boolean isVariableValue;
        private String activationInstructions;
    }

    @Data
    public static class ReloadCharacteristics {
        private Boolean isReloadable;
    }

    @Data
    public static class FulfillmentCharacteristics {
        private String id;
        private BigDecimal holdTimeSeconds;
        private String provisioningType;
        private String fulfillmentMethod;
    }

    @Data
    public static class ProductFees {
        private String id;
        private BigDecimal chargeAmount;
        private String feeType;
    }

    @Data
    public static class RedemptionCharacteristics {
        private List<RedemptionTexts> redemptionTexts;
        private List<String> redemptionOptions;
        private List<?> barCodeCharacteristics;
        private MagneticStripeCharacteristics magneticStripeCharacteristics;
    }

    @Data
    public static class RedemptionTexts {
        private String id;
        private String text;
        private String redemptionTextType;
    }

    @Data
    public static class MagneticStripeCharacteristics {
        private List<?> redemptionTracks;
    }

    @Data
    public static class TermsAndConditions {
        private String id;
        private String termsAndConditions;
        private String termsAndConditionsType;
    }

    @Data
    public static class ProductConfigurations {
        private String configurationId;
        private String configurationName;
        private String configurationDescription;
        private Integer itemId;
        private String startDate;
        private String endDate;
        private String configurationStatus;
        private List<ProductImages> productImages;
    }

    @Data
    public static class ProductImages {
        private String id;
        private String frontImage;
        private String imageSize;
    }
}
